package com.bonuo.crm.mapper;

import com.bonuo.crm.domain.Contact;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ContactMapper {
    List<Contact> selectContactList(Contact contact);

    Integer insertContact(Contact contact);

    Integer deleteContactById(Integer id);

    Integer updateContact(Contact contact);

    Integer selectContactByFacultyOrAgentId(@Param("id") Integer id, @Param("type") Integer type);

    Integer selectContactByFacultyIdAndContactNameAndPhone(@Param("facultyId") Integer facultyId, @Param("contactName") String contactName, @Param("phone") String phone);

    Integer selectContactByAgentIdAndFacultyAndContactNameAndPhone(@Param("agentId") Integer agentId, @Param("facultyName") String facultyName, @Param("contactName") String contactName, @Param("phone") String phone);

    Contact selectPhoneRepeat(String phone);

}
